package com.zhiyou100.servicrImpl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou100.mapper.doctor.DoctorMapper;
import com.zhiyou100.model.Doctor;
import com.zhiyou100.service.DoctorService;
@Service
public class DoctorServiceImpl implements DoctorService{
	@Autowired
	private DoctorMapper mapper;
	// 查询
	@Override
	public List<Doctor> findAll(Map<String, Object> map) {
		List<Doctor> doctor = mapper.findAll(map);
		return doctor;
	}
	// 详情
	@Override
	public Doctor findById(int doc_id) {
		Doctor doctor = mapper.findById(doc_id);
		return doctor;
	}
	
	
	// 删除
	@Override
	public void deleteById(int doc_id) {
		mapper.deleteById(doc_id);
		
	}
	// 添加
	@Override
	public void addDoctor(Doctor doctor) {
		mapper.addDoctor(doctor);
		
	}
	// 更新 查询
	@Override
	public Doctor findTodit(int doc_id) {
		Doctor doctor = mapper.findTodit(doc_id);
		return doctor;
	}
	@Override
	public void updateDoctor(Doctor doctor) {
		mapper.updateDoctor(doctor);
		
	}


	

}
